package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotterydetailDao;
import com.xyz.domain.table.SLotterydetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotterydetailLogic {

    @Autowired
    private SLotterydetailDao sLotterydetailDao;

    public SLotterydetail add(SLotterydetail sLotterydetail){
        return sLotterydetailDao.insert(sLotterydetail);
    }

    public Integer update(SLotterydetail sLotterydetail){
        return sLotterydetailDao.update(sLotterydetail);
    }

    public List<SLotterydetail> list(SLotterydetail sLotterydetail, String orderBy){
        return sLotterydetailDao.selectList(sLotterydetail, orderBy);
    }

    public Integer delete(Integer key){
        return sLotterydetailDao.delete(key);
    }

    public PageResponseModel<SLotterydetail> pageInfo(SLotterydetail sLotterydetail, String orderBy, Integer pageNo, Integer pageSize){
        return sLotterydetailDao.selectByPageNo(sLotterydetail, orderBy, pageNo, pageSize);
    }

}